package ramosmanuales.data.xml;

import java.util.ArrayList;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "amortizacion")
public class Amortizacion {

    private ArrayList<Pago> listaPago;

    @XmlElement(name = "pago")
    public ArrayList<Pago> getListaPago(){
        return listaPago;
    }

    public void setListaPago(ArrayList<Pago> listaPago){
        this.listaPago = listaPago;
    }

    public Object[] getElements(){
        Object elements[] = new Object[listaPago.size()];
        int i = 0;

        for(Pago pago : listaPago){
            elements[i] = pago.getElements();
            i++;
        }

        return elements;
    }
}